/*
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import dao.AplModuloDao;
import dao.AplModuloDaoImpl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import model.AplModulo;

@Named(value="aplModuloBean")
@SessionScoped
public class aplModuloBean implements Serializable{

    private List<AplModulo> aplModulos;  
    private AplModulo selectedAplModulo; 
    
    public aplModuloBean() {
        this.aplModulos = new ArrayList<>();
    }
    
    public List<AplModulo> getAplModulos() {
        AplModuloDao aplModuloDao = new AplModuloDaoImpl();
        this.aplModulos = new ArrayList<>();
        this.aplModulos = aplModuloDao.findAll();
        return aplModulos;
    }

    public AplModulo getSelectedAplModulo() {
        this.aplModulos = new ArrayList<>();
        return selectedAplModulo;
    }

    public void setSelectedAplModulo(AplModulo selectedAplModulo) {
        this.selectedAplModulo = selectedAplModulo;
    }
}